<%@ page import="jmysql.CUsuario"%> 
<%@ page import="validaciones.IndexData"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>UNIDAD DE SALUD</title>
<link rel="shortcut icon" type="image/ico" href="images/sistema/u-salud-logo.ico" />
	<link rel="stylesheet" href="lib/jquery1.7/themes/start/jquery-ui-1.8.17.custom.css" />
	<link rel="stylesheet" href="css/demos.css" />
	<link rel="stylesheet" href="css/pagina.css" />
	<link rel="stylesheet" href="css/menuaco.css" />
	<script type="text/javascript" src="lib/jquery1.7/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/external/jquery.bgiframe-2.1.2.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.core.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.widget.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.mouse.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.draggable.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.position.js"></script>	
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.button.js"></script>
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.effects.core.js"></script>		
	<script type="text/javascript" src="lib/jquery1.7/ui/jquery.ui.tabs.js"></script>
	<script type="text/javascript" src="lib/menuaco.js"></script>
<%
	IndexData index=new IndexData(); 
%>
        <script type="text/javascript">
        window.onfocus= function() {
	//sino esta en la web que le toca debe mandarlo a la inicial
	$.ajax({
	  url: "Sesion",
	  data:'pagina='+<%=index.aArea%>, 
	  type: 'post',
	  dataType: 'json',
	  success: function(data){
        	if(data.resultado==<%=index.Redirigir%>){
                        //nos movemos a el sitio index de cada rol
                      window.location = data.direccion;  
                }
	  }  
	  });
}
            
	$(function() {
                        $( "#tab-panel" ).tabs();
			$("button").button();
                        $("#salir").click(function(e){
                            $.ajax({url: 'FinalizarSesion',
                                success: function(data){
                                    window.location = 'pindex.jsp';  
                                }
	                });
                            
                        });
	});
	</script>
        <%CUsuario cu=new CUsuario();%>
</head>
<body>
<div id="header">
<table>
	<tr>
	<td class="ui-widget-content ui-corner-all">
		<img class="imagen" src="images/sistema/u-salud-logo.jpg" alt="#" />
		<img class="" src="images/sistema/usac.png"></img>
	</td>
	<td class="ui-widget-header ui-corner-all">
		<h1><strong>SISTEMA DE INVENTARIO UNIDAD DE SALUD</strong></h1>
		<h2><strong>PANEL DE CONTROL PRINCIPAL</strong></h2>
	</td>
	</tr>
</table>
	<div style="width:99%;margin-left:auto;margin-right:auto;" class="ui-widget-content ui-corner-all">
		<table>
		<tr>
			<td class="ui-widget-content ui-corner-all"><h3>Usuario:
			<!-- <%=cu.NombreUsuario((Integer)session.getAttribute("idusuario"))%> -->
		</h3></td>
			<td><button>Configuración</button></td>
			<td><button id="salir">Salir</button></td>
		</tr>
		</table>
	</div>
</div>

<br>
<div id="leftcol">
	<jsp:include page="ContenidoMenu/BarraMenuPanel.jsp"/>
</div>
<div id="content">
    	<div id="tab-panel">
		<ul>
			<li><a href="#PanelNuevaArea">NUEVA AREA<IMG class="imagen24" src="images/sistema/add.png"/></a></li>
			<li><a href="#PanelModificarArea">MODIFICAR AREA<IMG class="imagen24" src="images/sistema/edit.png"/></a></li>
		</ul>
		<div id="PanelNuevaArea">
			<jsp:include page="formularios/NuevaArea.jsp"></jsp:include>	
		</div>
		<div id="PanelModificarArea">
			<jsp:include page="formularios/ModificarArea.jsp"></jsp:include>
		</div>
	</div>
</div>
<br>
<div id="footer" >
	<p>UDS INVENTARIO VERSION 1.0 Todos los derechos reservados</p>
</div>
</body>

</html>